
<%@page import="model.Role"%>
<%@page import="model.Staff"%>
<s:url action="kpAlgorithm" namespace="/Administration/Bidding" var="kpAlgorithmUrl"/>
<s:url action="MarkovUpload" namespace="/Administration/Bidding" var="mkUploadUrl"/>
<s:url namespace="/Administration/Tools" action="onpageSEOChecker" var="seoCheckerUrl"></s:url>
<s:url namespace="/Administration" action="administration" var="administrationUrl"></s:url>
<s:url namespace="/Administration/Staff" action="staff-management" var="administratorUrl"></s:url>
<s:url namespace="/Administration/Customer" action="customer-management" var="customerUrl"></s:url>
<s:url namespace="/Administration/Product" action="product-management" var="producrUrl"></s:url>
<s:url namespace="/Administration/Catelogue" action="catelogue-management" var="catelogueUrl"></s:url>
<s:url namespace="/Administration/Supplier" action="supplier-management" var="supplierUrl"></s:url>
<s:url namespace="/Administration/Receipt" action="receip-management" var="receipUrl"></s:url>
<s:url namespace="/Administration/Issue" action="issue-management" var="issueUrl"></s:url>
<s:url namespace="/Administration/Order" action="order-management" var="orderUrl"></s:url>
<s:url namespace="/Administration/Inventory" action="inventory" var="inventoryUrl"></s:url>
<s:url namespace="/Administration/Inventory" action="inventory-statistic" var="inventoryStatisticUrl"></s:url>

<s:url namespace="/Administration/ExportExcel" action="ProductForm" var="exportUrl"></s:url>
<s:url namespace="/Administration/Revenue" action="revenuebydate" var="revenuebydateUrl"></s:url>
<s:url namespace="/Administration/Revenue" action="revenuebyproduct" var="revenuebyproductUrl"></s:url>
<s:url namespace="/Administration/Report" action="inventory-report" var="inventoryReportUrl"></s:url>
<s:url namespace="/Administration/Report" action="cost-report" var="costReportUrl"></s:url>
<s:url namespace="/Administration/Report" action="revenue-report" var="revenueReportUrl"></s:url>

<s:url action="pdf" var="ProductFormUrl"></s:url>
<s:url namespace="/" action="home" var="salepageUrl"></s:url>
<%
    Staff staff2 = (Staff) session.getAttribute("staff");

    if (staff2 == null) {
        response.sendRedirect(request.getContextPath() + "/Administration");
    } else if (staff2.getRole().equals("Administrator") || staff2.getRole().equals("Director")) {
        System.out.println(staff2.getRole());
%>
<ul>
    <li><s:a href="%{salepageUrl}">Sale Page</s:a></li>

    <li><s:a href="%{administrationUrl}">Administrator</s:a></li>


    <li><a href="#" >Management</a>
        <ul>
            <li><s:a href="%{customerUrl}">Customer</s:a></li>

            <li><s:a href="%{administratorUrl}">Staff</s:a></li>

            <li><s:a href="%{supplierUrl}">Supplier</s:a></li>
            <li><s:a href="%{catelogueUrl}">Category</s:a></li>

            <li><s:a href="%{producrUrl}">Product</s:a></li>
        </ul>
    </li>
    <li><a href="#">Store</a>
        <ul>
            <li><s:a href="%{orderUrl}">Order</s:a></li>   
            <li><s:a href="%{receipUrl}">Receipt</s:a></li>
            <li><s:a href="%{issueUrl}">Issue</s:a></li>
            <li><s:a href="%{inventoryUrl}">Inventory</s:a></li>
           
        </ul>
    </li>
    <li><a href="#">Statistic</a>
        <ul>
            <li><s:a href="%{inventoryStatisticUrl}">Inventory Statistic</s:a></li>
        </ul>
    </li>
    <li><a href="#">Report</a>
        <ul>
            <li><s:a href="%{inventoryReportUrl}">Inventory Report</s:a></li>
<!--            <li><s:a href="%{revenuebydateUrl}">Revenue Report by date</s:a></li>
            <li><s:a href="%{revenuebyproductUrl}">Revenue Report by product</s:a></li>-->
            <li><s:a href="%{revenueReportUrl}">Revenue Report</s:a></li>

             <li><s:a href="%{costReportUrl}">Cost Report</s:a></li>
        </ul>
    </li>
    <li><a href="">Tools</a>
        <ul>
            <li><s:a href="%{seoCheckerUrl}" title="Onpage SEO Checker Tool">Onpage SEO Checker Tool</s:a></li>
            <li><s:a href="%{kpAlgorithmUrl}"  title="Upload .csv file">Online KP Algorithm</s:a></li>
            <li><s:a href="%{mkUploadUrl}" title="Upload .csv file">Markov Decision Process</s:a></li>
        </ul>
    </li>
    <li><a href="https://docs.google.com/file/d/0B4AwMBP-nPGdVzY3TXBTR3FXdnc/edit" target="_blank">Instructions</a></li>
</ul>
<% } 
    else  if(staff2.getRole().equals("General Manager"))
    {%>
<ul>
    <li><s:a href="%{salepageUrl}">Sale Page</s:a></li>
    <li><s:a href="%{customerUrl}">Customer</s:a></li>
    <li><s:a href="%{supplierUrl}">Supplier</s:a></li>
    <li><s:a href="%{catelogueUrl}">Category</s:a></li>
    <li><s:a href="%{producrUrl}">Product</s:a></li>
    <li><s:a href="%{orderUrl}">Order</s:a></li>   
<li><a target="_blank" href="https://docs.google.com/file/d/0B4AwMBP-nPGdVzY3TXBTR3FXdnc/edit">Instructions</a></li>
</ul>
<%} else {
      //System.out.println(staff2.getRole());  
    %>
<ul>
    <li><s:a href="%{salepageUrl}">Sale Page</s:a></li>
    <li><s:a href="%{orderUrl}">Order</s:a></li>   
    <li><s:a href="%{receipUrl}">Receipt</s:a></li>
    <li><s:a href="%{issueUrl}">Issue</s:a></li>
    <li><s:a href="%{inventoryUrl}">Inventory</s:a></li>
    <li><a href="#">Report</a>
        <ul>
            
            <li><s:a href="%{inventoryReportUrl}">Inventory Report</s:a></li>
<!--            <li><s:a href="%{revenuebydateUrl}">Revenue Report by date</s:a></li>
            <li><s:a href="%{revenuebyproductUrl}">Revenue Report by product</s:a></li>-->
            <li><s:a href="%{revenueReportUrl}">Revenue Report</s:a></li>
            <li><s:a href="%{costReportUrl}">Cost Report</s:a></li>
        </ul>
    </li>
     <li><a href="#">Statistic</a>
        <ul>
            <li><s:a href="%{inventoryStatisticUrl}">Inventory Statistic</s:a></li>
        </ul>
    </li>
    <li><a target="_blank" href="https://docs.google.com/file/d/0B4AwMBP-nPGdVzY3TXBTR3FXdnc/edit">Instructions</a></li>
</ul>
<%}%>
